package com.example.demo.exception;

import com.example.demo.core.ResultStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 叮当猫的百宝箱
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
public abstract class ServiceException extends RuntimeException {
    private ResultStatus resultStatus;

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public ServiceException(ResultStatus resultStatus, String message) {
        super(message);
        setResultStatus(resultStatus);
    }
}


